import Vue from 'vue'
import Router from 'vue-router'


import Works from '../components/nav-content/Works'
import Service from '../components/nav-content/Service'
import Awards from '../components/nav-content/Awards'
import Team from '../components/nav-content/Team'
import Join from '../components/nav-content/Join'
import Contact from '../components/nav-content/Contact'

import Format from '../components/tab-content/Format'
import Typology from '../components/tab-content/Typology'
import Location from '../components/tab-content/Location'
import lixinTime from '../components/tab-content/lixinTime'


Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    //重定向
    {
      path:'/',
      redirect: '/works'
    },
    {
      path:'/works',
      component: Works,
      children:[                         //子路由
        {
          path:'',
          redirect: '/works/Format'
        },
        {
          path:'/works/Format',               //path最左侧的/永远是根路径 有两种写法
          component: Format
        },
        {
          path:'Typology',                   //第二种 简化写法
          component: Typology
        },
        {
          path:'Location',
          component: Location
        },
        {
          path:'lixinTime',
          component: lixinTime
        }
      ]
    },
    {
      path:'/service',
      component: Service
    },
    {
      path:'/awards',
      component: Awards
    },
    {
      path:'/Team',
      component: Team
    },
    {
      path:'/Join',
      component: Join
    },
    {
      path:'/Contact',
      component: Contact
    }


  ]
})
